<?php
include('../../../config.php');
include(PUNG_ROOT . '/admin/header.php');

$adminmenu = array(
	INDEX_001 => 'index.php',
);

$index = $db->db_query('SELECT * FROM '. DB_PREFIX .'index');
$index = $db->db_result();

if(isset($_POST['submit']))
{
	$db -> db_query("UPDATE " . DB_PREFIX . "index SET 
	content = '" . addslashes($_POST['contentfield']) . "'");

	redirect_with_message('msg', 'CONTENT_006', 'index.php');
}

include(PUNG_ROOT . '/admin/head.php');
?>


<h3><?php print INDEX_002; ?></h3>

<form action="" method="post" name="form1">
<table width="100%">
<tr>
	<td width="120"><strong><?php print INDEX_003; ?>:</strong></td>
	<td><?php print INDEX_009;?></td>
</tr>
<tr>
	<td valign="top"><strong><?php print INDEX_004; ?>:</strong></td>
	<td><textarea style="width: 530px; height: 500px" name="contentfield"><?php print $index[0]['content'];?></textarea></td>
</tr>
</table>
<br />
<input type="submit" name="submit" class="form_button" value="<?php print INDEX_008; ?>" />
</form>

<?php
include(PUNG_ROOT . '/admin/footer.php');
?>